<legend>Informes <span style="margin-left:20px;color:#267e82;"><?php echo $this->cliente->getNombres().", ".$this->cliente->getApellido()." (DNI: ".$this->cliente->getNroDocumento().")" ?></span></legend>
<?php if (isset($this->error)) { ?>
    <?php if ($this->error) { ?>
        <div class="alert alert-error alert-block">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <?php echo $this->mensaje ?>
        </div>
    <?php } else { ?>
        <div class="alert alert-success alert-block">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <?php echo $this->mensaje ?>
        </div>
    <?php } ?>
<?php } ?>

<div class="row">
    <div class="span12"><div id="mensajeInforme"></div></div>
</div>

<form method="post" action="<?php echo $this->baseUrl("usuarios/ajax/informescredito/") ?>">
    <input type="hidden" name="persona_id" value="<?php echo $this->persona_id ?>" />
    <div class="row">
        <table style="margin:10px; width:90%;">
            <tbody>
                <tr>
                    <td style="vertical-align:text-top;">
                        <label class="control-label">Tipo Informe</label>
                        <select  class="input-large" id="tipo_informe_id" name="tipo_informe_id" >
                            <?php foreach ($this->tiposInformes as $tipoInforme) { ?>
                                <option value="<?php echo $tipoInforme->getId(); ?>"><?php echo $tipoInforme->getDescripcion(); ?></option>
                            <?php } ?>
                        </select>
                    </td>
                    <td style="vertical-align:text-top;">
                        <label class="control-label">Comentario</label>
                        <textarea id="comentario_informe" name="comentario" class="span7"></textarea> 
                    </td>
                    <td>
                        <button type="submit" class="btn btn-success">
                            <i class="icon-plus-sign icon-white"></i>Guardar</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</form>

<div class="row">
    <table class="tabla_reducida" style="margin:10px; width:90%;">
        <thead>
            <tr>
                <th>Fecha</th><th>Comentario</th><th>Tipo</th>
            </tr>
        </thead>
        <tbody>
            <?php $informe = new Doctrine_Model_Entities_Informe() ?>
            <?php foreach ($this->conjInformes as $informe) { ?>
                <tr>
                    <td><?php echo $informe->getFecha()->format("d/m/Y") ?></td>
                    <td><?php echo $informe->getComentario() ?></td>
                    <td><?php echo $informe->getTipoInfome()->getDescripcion() ?></td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
</div>


